﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLDC.Common.Estate;

namespace ZLDC.Estate.CM
{
    public partial class MyCustomer : _PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                btnCompetences();
            }
        }


        // 权限控制按钮
        private void btnCompetences()
        {            
            if (!ZLDC.Common.BaseUser.UserInfo.GetPopedom("删除客源"))
                btnDelete.Visible = false;
            if (!ZLDC.Common.BaseUser.UserInfo.GetPopedom("转介客"))
                btnChange.Visible = false;
            //if (!ZLDC.Common.BaseUser.UserInfo.GetPopedom("转私客"))
            //    btnInfo1.Visible = false;
            if (ZLDC.Common.BaseUser.UserInfo.GetPopedom("修改客源"))
                btnUpdate.Visible = true;

            // 转公客的权限判断
            if (!ZLDC.Common.BaseUser.UserInfo.GetPopedom("转公客"))
                btnInfo2.Visible = false;
            else
                btnInfo2.Visible = true;
        }

    }
}
